home *** CD-ROM | disk | FTP | other *** search
- property theta
-
- on beginSprite me
- set the cursor of sprite the spriteNum of me to [member "hand", member "Hand Mask"]
- set theta to 45
- end
-
- on endSprite me
- set the cursor of sprite the spriteNum of me to 0
- end
-
- on mouseDown me
- set the cursor of sprite the spriteNum of me to [member "Closed hand", member "Closed Hand Mask"]
- repeat while the stillDown
- clear(member "DAngle")
- set angle to PointToVector(member "DAngle", 174, 174, the mouseH - 31, the mouseV - 32)
- set theta to the locH of angle
- if theta >= 360 then
- set theta to theta - 360
- else
- if theta < 0 then
- set theta to theta + 360
- end if
- end if
- put theta into field "theta"
- set endP to VectorToPoint(member "DAngle", 174, 174, theta, 175)
- if the machineType < 256 then
- SetForeColor(member "DAngle", 255, 0, 255)
- DrawFilledWedge(member "DAngle", 142, 144, 208, 210, 0, theta)
- end if
- SetForeColor(member "DAngle", 0, 0, 255)
- DrawSingleArrow(member "DAngle", 174, 174, the locH of endP, the locV of endP)
- Redraw(member "DAngle")
- sendSprite(32, #move, theta)
- updateStage()
- end repeat
- drawLine(the spriteNum of me, 207, 206, the locV of endP + 32, the locH of endP + 31)
- set the cursor of sprite the spriteNum of me to [member "hand", member "Hand Mask"]
- updateStage()
- end
-